package com.entity;

// Generated 09.02.2014 20:16:29 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * WorklogsEntity generated by hbm2java
 */
@Entity
@Table(name = "worklogs", catalog = "jiraexcel", uniqueConstraints = @UniqueConstraint(columnNames = "id"))
public class WorklogsEntity implements java.io.Serializable {

	private Integer idWorklogs;
	private WorklogEntity worklogEntity;
	private UserEntity userEntityByIdAuthor;
	private UserEntity userEntityByIdUpdatedAuthor;
	private String self;
	private String comment;
	private Date created;
	private Date updated;
	private Date started;
	private String timeSpent;
	private String timeSpentSeconds;
	private String id;

	public WorklogsEntity() {
	}

	public WorklogsEntity(WorklogEntity worklogEntity,
			UserEntity userEntityByIdAuthor,
			UserEntity userEntityByIdUpdatedAuthor) {
		this.worklogEntity = worklogEntity;
		this.userEntityByIdAuthor = userEntityByIdAuthor;
		this.userEntityByIdUpdatedAuthor = userEntityByIdUpdatedAuthor;
	}

	public WorklogsEntity(WorklogEntity worklogEntity,
			UserEntity userEntityByIdAuthor,
			UserEntity userEntityByIdUpdatedAuthor, String self,
			String comment, Date created, Date updated, Date started,
			String timeSpent, String timeSpentSeconds, String id) {
		this.worklogEntity = worklogEntity;
		this.userEntityByIdAuthor = userEntityByIdAuthor;
		this.userEntityByIdUpdatedAuthor = userEntityByIdUpdatedAuthor;
		this.self = self;
		this.comment = comment;
		this.created = created;
		this.updated = updated;
		this.started = started;
		this.timeSpent = timeSpent;
		this.timeSpentSeconds = timeSpentSeconds;
		this.id = id;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id_worklogs", unique = true, nullable = false)
	public Integer getIdWorklogs() {
		return this.idWorklogs;
	}

	public void setIdWorklogs(Integer idWorklogs) {
		this.idWorklogs = idWorklogs;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_worklog", nullable = false)
	public WorklogEntity getWorklogEntity() {
		return this.worklogEntity;
	}

	public void setWorklogEntity(WorklogEntity worklogEntity) {
		this.worklogEntity = worklogEntity;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_author", nullable = false)
	public UserEntity getUserEntityByIdAuthor() {
		return this.userEntityByIdAuthor;
	}

	public void setUserEntityByIdAuthor(UserEntity userEntityByIdAuthor) {
		this.userEntityByIdAuthor = userEntityByIdAuthor;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_updatedAuthor", nullable = false)
	public UserEntity getUserEntityByIdUpdatedAuthor() {
		return this.userEntityByIdUpdatedAuthor;
	}

	public void setUserEntityByIdUpdatedAuthor(
			UserEntity userEntityByIdUpdatedAuthor) {
		this.userEntityByIdUpdatedAuthor = userEntityByIdUpdatedAuthor;
	}

	@Column(name = "self", length = 1000)
	public String getSelf() {
		return this.self;
	}

	public void setSelf(String self) {
		this.self = self;
	}

	@Column(name = "comment", length = 1000)
	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "created", length = 19)
	public Date getCreated() {
		return this.created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "updated", length = 19)
	public Date getUpdated() {
		return this.updated;
	}

	public void setUpdated(Date updated) {
		this.updated = updated;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "started", length = 19)
	public Date getStarted() {
		return this.started;
	}

	public void setStarted(Date started) {
		this.started = started;
	}

	@Column(name = "timeSpent", length = 1000)
	public String getTimeSpent() {
		return this.timeSpent;
	}

	public void setTimeSpent(String timeSpent) {
		this.timeSpent = timeSpent;
	}

	@Column(name = "timeSpentSeconds", length = 1000)
	public String getTimeSpentSeconds() {
		return this.timeSpentSeconds;
	}

	public void setTimeSpentSeconds(String timeSpentSeconds) {
		this.timeSpentSeconds = timeSpentSeconds;
	}

	@Column(name = "id", unique = true, length = 100)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

}
